// app/procurement/dashboard/page.tsx import * as React from "react"; import { Skeleton } from "@/components/ui/skeleton"; import { Shell } from "@/components/shell"; import { ErrorBoundary } from "@/components/error-boundary"; import { getDashboardData } from "@/lib/dashboard/service"; import { DashboardClient } from "@/lib/dashboard/dashboard-client"; // 대시보드 데이터 로딩 컴포넌트 async function DashboardContent() { try { const data = await getDashboardData("engineering"); const handleRefresh = async () => { "use server"; return await getDashboardData("engineering"); }; return ( ); } catch (error) { console.error("Dashboard data loading error:", error); throw error; } } // 대시보드 로딩 스켈레톤 function DashboardSkeleton() { return (
{/* 헤더 스켈레톤 */}
{/* 요약 카드 스켈레톤 */}
{[...Array(4)].map((_, i) => (
))}
{/* 차트 스켈레톤 */}
{[...Array(2)].map((_, i) => (
))}
{/* 탭 스켈레톤 */}
{[...Array(6)].map((_, i) => (
))}
); } // 에러 표시 컴포넌트 function DashboardError({ error, reset }: { error: Error; reset: () => void }) { return (

대시보드를 불러올 수 없습니다

{error.message || "알 수 없는 오류가 발생했습니다."}

); } export default async function DashboardPage() { return ( }> ); }